package com.intelligent.system.auth.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.time.LocalDateTime;
import java.util.List;

@Data
@ApiModel(description = "菜单信息")
public class MenuDTO {
    @ApiModelProperty(value = "菜单ID", example = "1")
    private Long menuId;

    @NotBlank(message = "菜单名称不能为空")
    @Size(max = 50, message = "菜单名称长度不能超过50个字符")
    @ApiModelProperty(value = "菜单名称", required = true)
    private String menuName;

    @ApiModelProperty(value = "父菜单ID", example = "0")
    private Long parentId;

    @NotNull(message = "显示顺序不能为空")
    @ApiModelProperty(value = "显示顺序", required = true)
    private Integer orderNum;

    @Size(max = 200, message = "路由地址长度不能超过200个字符")
    @ApiModelProperty("路由地址")
    private String url;

    @Size(max = 20, message = "打开方式长度不能超过20个字符")
    @ApiModelProperty("打开方式（menuItem页签 menuBlank新窗口）")
    private String target;

    @NotBlank(message = "菜单类型不能为空")
    @Size(max = 1, message = "菜单类型长度不能超过1个字符")
    @ApiModelProperty(value = "菜单类型（M目录 C菜单 F按钮）", required = true)
    private String menuType;

    @Size(max = 1, message = "菜单状态长度不能超过1个字符")
    @ApiModelProperty("菜单状态（0显示 1隐藏）")
    private String visible;

    @Size(max = 1, message = "是否刷新长度不能超过1个字符")
    @ApiModelProperty("是否刷新（0刷新 1不刷新）")
    private String isRefresh;

    @Size(max = 100, message = "权限标识长度不能超过100个字符")
    @ApiModelProperty("权限标识")
    private String perms;

    @Size(max = 100, message = "菜单图标长度不能超过100个字符")
    @ApiModelProperty("菜单图标")
    private String icon;

    @Size(max = 500, message = "备注长度不能超过500个字符")
    @ApiModelProperty("备注")
    private String remark;

    @ApiModelProperty("子菜单")
    private List<MenuDTO> children;

    @ApiModelProperty("创建者")
    private String createBy;

    @ApiModelProperty("创建时间")
    private LocalDateTime createTime;

    @ApiModelProperty("更新者")
    private String updateBy;

    @ApiModelProperty("更新时间")
    private LocalDateTime updateTime;
} 